package controller;

import java.awt.event.ActionEvent;
import javax.swing.JPanel;
import model.*;

/**
 * AbstractController
 * A superclass for all controllers
 * @author Team X
 * @version 1
 */
public abstract class AbstractController extends JPanel 
{
	private static final long serialVersionUID = 1L;
	protected Simulator simulator;
	
	/** Constructor */
	public AbstractController(Simulator simulator) 
	{
		this.simulator=simulator;
	}
	
	/**
	 * Abstract method to build the view and add elements,
	 * should be called from the constructor.
	 */
	protected abstract void createView();
	
	/**
	 * Explicit declaration of an event handler.
	 * @param ActionEvent action - The event.
	 */
	public abstract void actionPerformed(ActionEvent action);
}
